

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="zh" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="zh" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>optuna.samplers._grid &mdash; Optuna 1.4.0 文档</title>
  

  
  
    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="../../../_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/underscore.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />
    <link rel="index" title="索引" href="../../../genindex.html" />
    <link rel="search" title="搜索" href="../../../search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../../../index.html" class="icon icon-home"> Optuna
          

          
          </a>

          
            
            
              <div class="version">
                1.4.0
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">目录</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../installation.html">安装</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../tutorial/index.html">教程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../reference/index.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../faq.html">常见问题</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../index.html">Optuna</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../../index.html">模块代码</a> &raquo;</li>
        
      <li>optuna.samplers._grid</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <h1>optuna.samplers._grid 源代码</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">collections</span>
<span class="kn">import</span> <span class="nn">itertools</span>
<span class="kn">import</span> <span class="nn">random</span>

<span class="kn">from</span> <span class="nn">optuna._experimental</span> <span class="kn">import</span> <span class="n">experimental</span>
<span class="kn">from</span> <span class="nn">optuna.samplers</span> <span class="kn">import</span> <span class="n">BaseSampler</span>
<span class="kn">from</span> <span class="nn">optuna</span> <span class="kn">import</span> <span class="n">type_checking</span>

<span class="k">if</span> <span class="n">type_checking</span><span class="o">.</span><span class="n">TYPE_CHECKING</span><span class="p">:</span>
    <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Any</span>  <span class="c1"># NOQA</span>
    <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Dict</span>  <span class="c1"># NOQA</span>
    <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span>  <span class="c1"># NOQA</span>
    <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Mapping</span>  <span class="c1"># NOQA</span>
    <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Sequence</span>  <span class="c1"># NOQA</span>
    <span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Union</span>

    <span class="kn">from</span> <span class="nn">optuna.distributions</span> <span class="kn">import</span> <span class="n">BaseDistribution</span>  <span class="c1"># NOQA</span>
    <span class="kn">from</span> <span class="nn">optuna.study</span> <span class="kn">import</span> <span class="n">Study</span>  <span class="c1"># NOQA</span>
    <span class="kn">from</span> <span class="nn">optuna.trial</span> <span class="kn">import</span> <span class="n">FrozenTrial</span>  <span class="c1"># NOQA</span>

    <span class="n">GridValueType</span> <span class="o">=</span> <span class="n">Union</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">bool</span><span class="p">,</span> <span class="kc">None</span><span class="p">]</span>


<div class="viewcode-block" id="GridSampler"><a class="viewcode-back" href="../../../reference/samplers.html#optuna.samplers.GridSampler">[文档]</a><span class="nd">@experimental</span><span class="p">(</span><span class="s2">&quot;1.2.0&quot;</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">GridSampler</span><span class="p">(</span><span class="n">BaseSampler</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Sampler using grid search.</span>

<span class="sd">    With :class:`~optuna.samplers.GridSampler`, the trials suggest all combinations of parameters</span>
<span class="sd">    in the given search space during the study.</span>

<span class="sd">    Example:</span>

<span class="sd">        .. testcode::</span>

<span class="sd">            import optuna</span>

<span class="sd">            def objective(trial):</span>
<span class="sd">                x = trial.suggest_uniform(&#39;x&#39;, -100, 100)</span>
<span class="sd">                y = trial.suggest_int(&#39;y&#39;, -100, 100)</span>
<span class="sd">                return x ** 2 + y ** 2</span>

<span class="sd">            search_space = {</span>
<span class="sd">                &#39;x&#39;: [-50, 0, 50],</span>
<span class="sd">                &#39;y&#39;: [-99, 0, 99]</span>
<span class="sd">            }</span>
<span class="sd">            study = optuna.create_study(sampler=optuna.samplers.GridSampler(search_space))</span>
<span class="sd">            study.optimize(objective, n_trials=3*3)</span>

<span class="sd">    Note:</span>

<span class="sd">        :class:`~optuna.samplers.GridSampler` raises an error if all combinations in the passed</span>
<span class="sd">        ``search_space`` has already been evaluated. Please make sure that unnecessary trials do</span>
<span class="sd">        not run during optimization by properly setting ``n_trials`` in the</span>
<span class="sd">        :func:`~optuna.study.Study.optimize` method.</span>

<span class="sd">    Note:</span>

<span class="sd">        :class:`~optuna.samplers.GridSampler` does not take care of a parameter&#39;s quantization</span>
<span class="sd">        specified by discrete suggest methods but just samples one of values specified in the</span>
<span class="sd">        search space. E.g., in the following code snippet, either of ``-0.5`` or ``0.5`` is</span>
<span class="sd">        sampled as ``x`` instead of an integer point.</span>

<span class="sd">        .. testcode::</span>

<span class="sd">            import optuna</span>

<span class="sd">            def objective(trial):</span>
<span class="sd">                # The following suggest method specifies integer points between -5 and 5.</span>
<span class="sd">                x = trial.suggest_discrete_uniform(&#39;x&#39;, -5, 5, 1)</span>
<span class="sd">                return x ** 2</span>

<span class="sd">            # Non-int points are specified in the grid.</span>
<span class="sd">            search_space = {&#39;x&#39;: [-0.5, 0.5]}</span>
<span class="sd">            study = optuna.create_study(sampler=optuna.samplers.GridSampler(search_space))</span>
<span class="sd">            study.optimize(objective, n_trials=2)</span>

<span class="sd">    Args:</span>
<span class="sd">        search_space:</span>
<span class="sd">            A dictionary whose key and value are a parameter name and the corresponding candidates</span>
<span class="sd">            of values, respectively.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">search_space</span><span class="p">):</span>
        <span class="c1"># type: (Mapping[str, Sequence[GridValueType]]) -&gt; None</span>

        <span class="k">for</span> <span class="n">param_name</span><span class="p">,</span> <span class="n">param_values</span> <span class="ow">in</span> <span class="n">search_space</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
            <span class="k">for</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">param_values</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_check_value</span><span class="p">(</span><span class="n">param_name</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">OrderedDict</span><span class="p">()</span>
        <span class="k">for</span> <span class="n">param_name</span><span class="p">,</span> <span class="n">param_values</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">search_space</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]):</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span><span class="p">[</span><span class="n">param_name</span><span class="p">]</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">param_values</span><span class="p">)</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">_all_grids</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">itertools</span><span class="o">.</span><span class="n">product</span><span class="p">(</span><span class="o">*</span><span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span><span class="o">.</span><span class="n">values</span><span class="p">()))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_param_names</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">search_space</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_n_min_trials</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_all_grids</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">infer_relative_search_space</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">study</span><span class="p">,</span> <span class="n">trial</span><span class="p">):</span>
        <span class="c1"># type: (Study, FrozenTrial) -&gt; Dict[str, BaseDistribution]</span>

        <span class="k">return</span> <span class="p">{}</span>

    <span class="k">def</span> <span class="nf">sample_relative</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">study</span><span class="p">,</span> <span class="n">trial</span><span class="p">,</span> <span class="n">search_space</span><span class="p">):</span>
        <span class="c1"># type: (Study, FrozenTrial, Dict[str, BaseDistribution]) -&gt; Dict[str, Any]</span>

        <span class="c1"># Instead of returning param values, GridSampler puts the target grid id as a system attr,</span>
        <span class="c1"># and the values are returned from `sample_independent`. This is because the distribution</span>
        <span class="c1"># object is hard to get at the beginning of trial, while we need the access to the object</span>
        <span class="c1"># to validate the sampled value.</span>

        <span class="n">unvisited_grids</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_unvisited_grid_ids</span><span class="p">(</span><span class="n">study</span><span class="p">)</span>

        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">unvisited_grids</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
                <span class="s2">&quot;All grids have been evaluated. If you want to avoid this error, &quot;</span>
                <span class="s2">&quot;please make sure that unnecessary trials do not run during &quot;</span>
                <span class="s2">&quot;optimization by properly setting `n_trials` in `study.optimize`.&quot;</span>
            <span class="p">)</span>

        <span class="c1"># In distributed optimization, multiple workers may simultaneously pick up the same grid.</span>
        <span class="c1"># To make the conflict less frequent, the grid is chosen randomly.</span>
        <span class="n">grid_id</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="n">unvisited_grids</span><span class="p">)</span>

        <span class="n">study</span><span class="o">.</span><span class="n">_storage</span><span class="o">.</span><span class="n">set_trial_system_attr</span><span class="p">(</span><span class="n">trial</span><span class="o">.</span><span class="n">_trial_id</span><span class="p">,</span> <span class="s2">&quot;search_space&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span><span class="p">)</span>
        <span class="n">study</span><span class="o">.</span><span class="n">_storage</span><span class="o">.</span><span class="n">set_trial_system_attr</span><span class="p">(</span><span class="n">trial</span><span class="o">.</span><span class="n">_trial_id</span><span class="p">,</span> <span class="s2">&quot;grid_id&quot;</span><span class="p">,</span> <span class="n">grid_id</span><span class="p">)</span>

        <span class="k">return</span> <span class="p">{}</span>

    <span class="k">def</span> <span class="nf">sample_independent</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">study</span><span class="p">,</span> <span class="n">trial</span><span class="p">,</span> <span class="n">param_name</span><span class="p">,</span> <span class="n">param_distribution</span><span class="p">):</span>
        <span class="c1"># type: (Study, FrozenTrial, str, BaseDistribution) -&gt; Any</span>

        <span class="k">if</span> <span class="n">param_name</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span><span class="p">:</span>
            <span class="n">message</span> <span class="o">=</span> <span class="s2">&quot;The parameter name, </span><span class="si">{}</span><span class="s2">, is not found in the given grid.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">param_name</span><span class="p">)</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="n">message</span><span class="p">)</span>

        <span class="c1"># TODO(c-bata): Reduce the number of duplicated evaluations on multiple workers.</span>
        <span class="c1"># Current selection logic may evaluate the same parameters multiple times.</span>
        <span class="c1"># See https://gist.github.com/c-bata/f759f64becb24eea2040f4b2e3afce8f for details.</span>
        <span class="n">grid_id</span> <span class="o">=</span> <span class="n">trial</span><span class="o">.</span><span class="n">system_attrs</span><span class="p">[</span><span class="s2">&quot;grid_id&quot;</span><span class="p">]</span>
        <span class="n">param_value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_all_grids</span><span class="p">[</span><span class="n">grid_id</span><span class="p">][</span><span class="bp">self</span><span class="o">.</span><span class="n">_param_names</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">param_name</span><span class="p">)]</span>
        <span class="n">contains</span> <span class="o">=</span> <span class="n">param_distribution</span><span class="o">.</span><span class="n">_contains</span><span class="p">(</span><span class="n">param_distribution</span><span class="o">.</span><span class="n">to_internal_repr</span><span class="p">(</span><span class="n">param_value</span><span class="p">))</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">contains</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
                <span class="s2">&quot;The value `</span><span class="si">{}</span><span class="s2">` is out of range of the parameter `</span><span class="si">{}</span><span class="s2">`. Please make &quot;</span>
                <span class="s2">&quot;sure the search space of the `GridSampler` only contains values &quot;</span>
                <span class="s2">&quot;consistent with the distribution specified in the objective &quot;</span>
                <span class="s2">&quot;function. The distribution is: `</span><span class="si">{}</span><span class="s2">`.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
                    <span class="n">param_value</span><span class="p">,</span> <span class="n">param_name</span><span class="p">,</span> <span class="n">param_distribution</span>
                <span class="p">)</span>
            <span class="p">)</span>

        <span class="k">return</span> <span class="n">param_value</span>

    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">_check_value</span><span class="p">(</span><span class="n">param_name</span><span class="p">,</span> <span class="n">param_value</span><span class="p">):</span>
        <span class="c1"># type: (str, Any) -&gt; None</span>

        <span class="k">if</span> <span class="n">param_value</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">or</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">param_value</span><span class="p">,</span> <span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">,</span> <span class="nb">bool</span><span class="p">)):</span>
            <span class="k">return</span>

        <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
            <span class="s2">&quot;</span><span class="si">{}</span><span class="s2"> contains a value with the type of </span><span class="si">{}</span><span class="s2">, which is not supported by &quot;</span>
            <span class="s2">&quot;`GridSampler`. Please make sure a value is `str`, `int`, `float`, `bool`&quot;</span>
            <span class="s2">&quot; or `None`.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">param_name</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="n">param_value</span><span class="p">))</span>
        <span class="p">)</span>

    <span class="k">def</span> <span class="nf">_get_unvisited_grid_ids</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">study</span><span class="p">):</span>
        <span class="c1"># type: (Study) -&gt; List[int]</span>

        <span class="c1"># List up unvisited grids based on already finished ones.</span>
        <span class="n">visited_grids</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">study</span><span class="o">.</span><span class="n">trials</span><span class="p">:</span>
            <span class="k">if</span> <span class="p">(</span>
                <span class="n">t</span><span class="o">.</span><span class="n">state</span><span class="o">.</span><span class="n">is_finished</span><span class="p">()</span>
                <span class="ow">and</span> <span class="s2">&quot;grid_id&quot;</span> <span class="ow">in</span> <span class="n">t</span><span class="o">.</span><span class="n">system_attrs</span>
                <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_same_search_space</span><span class="p">(</span><span class="n">t</span><span class="o">.</span><span class="n">system_attrs</span><span class="p">[</span><span class="s2">&quot;search_space&quot;</span><span class="p">])</span>
            <span class="p">):</span>
                <span class="n">visited_grids</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">t</span><span class="o">.</span><span class="n">system_attrs</span><span class="p">[</span><span class="s2">&quot;grid_id&quot;</span><span class="p">])</span>

        <span class="n">unvisited_grids</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_n_min_trials</span><span class="p">))</span> <span class="o">-</span> <span class="nb">set</span><span class="p">(</span><span class="n">visited_grids</span><span class="p">)</span>

        <span class="k">return</span> <span class="nb">list</span><span class="p">(</span><span class="n">unvisited_grids</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">_same_search_space</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">search_space</span><span class="p">):</span>
        <span class="c1"># type: (Mapping[str, Sequence[GridValueType]]) -&gt; bool</span>

        <span class="k">if</span> <span class="nb">set</span><span class="p">(</span><span class="n">search_space</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="o">!=</span> <span class="nb">set</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span><span class="o">.</span><span class="n">keys</span><span class="p">()):</span>
            <span class="k">return</span> <span class="kc">False</span>

        <span class="k">for</span> <span class="n">param_name</span> <span class="ow">in</span> <span class="n">search_space</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
            <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">search_space</span><span class="p">[</span><span class="n">param_name</span><span class="p">])</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span><span class="p">[</span><span class="n">param_name</span><span class="p">]):</span>
                <span class="k">return</span> <span class="kc">False</span>

            <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">param_value</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="n">search_space</span><span class="p">[</span><span class="n">param_name</span><span class="p">])):</span>
                <span class="k">if</span> <span class="n">param_value</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_search_space</span><span class="p">[</span><span class="n">param_name</span><span class="p">][</span><span class="n">i</span><span class="p">]:</span>
                    <span class="k">return</span> <span class="kc">False</span>

        <span class="k">return</span> <span class="kc">True</span></div>
</pre></div>

           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2018, Optuna Contributors.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
    <a href="../../../privacy.html">Privacy Policy</a>.
     


</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
    <!-- Theme Analytics -->
    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-55135190-8', 'auto');
    ga('send', 'pageview');
    </script>

    
   

</body>
</html>